import Client from 'ssh2'
import DataKit from './DataKit'

export default {
    open(){
        let config = DataKit.find();
        if(!config){
            return false;
        }
        var conn = new Client();
        conn.on('ready',function(){
            console.log('Client :: ready');
            conn.exec('pwd',function(err,stream){
                console.log(err);
                console.log(stream);
            })
        }).connect(config);
        return conn;
    }
}
